const { defineConfig } = require('@vue/cli-service')
const AutoImport = require('unplugin-auto-import/webpack')
const Components = require('unplugin-vue-components/webpack')
const { ElementPlusResolver } = require('unplugin-vue-components/resolvers')

module.exports = defineConfig({
  transpileDependencies: true,
  //减少没用的map文件
  productionSourceMap:false,
  //  基本路径
  publicPath: process.env.NODE_ENV === 'development' ? '/CICADA' : '/CICADA',    //是否是开发环境，是就是./路径，否则/myApp/
  //  构建时的输出目录
  outputDir: "CICADA",

  //  放置静态资源的目录
  assetsDir: "static",
  configureWebpack: {
    plugins: [
      AutoImport({
        resolvers: [ElementPlusResolver()],
      }),
      Components({
        resolvers: [ElementPlusResolver()],
      }),
    ],
  }
})
